package db

import (
	log "github.com/sirupsen/logrus"
	"src/db/db_modle"
)

// 获取用户银行卡信息
func GetCardInfo(uid uint) (db_modle.Card, error) {
	orm := GetMysqlOrm()
	defer orm.Close()
	var card db_modle.Card
	result := orm.Where("user_id = ?", uid).Find(&card)
	if e := result.Error; e != nil {
		log.Error(e.Error())
		return db_modle.Card{}, e
	}
	return card, nil
}
